/*

 * @(#)IllegalContentException.java

 */

package com.stony.poie.exception;

/**
 * 
 * Illegal content of XlsUnit.
 * 
 * <p>
 * 
 * eg. a non-XlsUnit content, a XlsTRow in a XlsTRow,
 * 
 * or a XlsTable in a XlsTData, etc.
 * 
 * <p>
 * 
 * Last modified: February 1, 2006
 * 
 * 
 * 
 * @author Thomas Wu
 * 
 * @version 1.0.0
 * 
 */

public final class IllegalContentException extends Exception {

	final static long serialVersionUID = -3387516993124229948L;

	/**
	 * 
	 * Construct a new IllegalContentException.
	 * 
	 * @param clazz
	 *            the illegal content's class
	 * 
	 */

	public IllegalContentException(Class clazz) {

		super("Illegal content: " + clazz.getName());

	}

	/**
	 * 
	 * Construct a new IllegalContentException.
	 * 
	 * @param found
	 *            the illegal content's class
	 * 
	 * @param expected
	 *            expected content's class
	 * 
	 */

	public IllegalContentException(Class found, Class expected) {

		super("Illegal content. Found: " + found.getName() + " Expected: "
				+ expected.getName());

	}

}
